<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang='en'>
<head>
	<meta charset='utf-8' />
	<title>广溢信息技术有限公司</title>
	<meta content='' name='description' />
	<meta content='' name='author' />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Bootstrap -->
	<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet" >
    <link href="__PUBLIC__/css/jquery-ui-1.9.2.custom.css" rel="stylesheet" />
	<link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet" >

	<!--[if IE 7]>
		<link  href="__PUBLIC__/css/font-awesome-ie7.min.css" rel="stylesheet">
	<![endif]-->

	<!--[if lt IE 9]>
		<link type="text/css" href="__PUBLIC__/css/custom-theme/jquery.ui.1.9.2.ie.css"  rel="stylesheet" />
	<![endif]-->

	<link href="__PUBLIC__/css/bootstrap-responsive.css" rel="stylesheet">
	<link href="__PUBLIC__/css/test.css" rel="stylesheet">
	<script src="__PUBLIC__/js/jquery.js"></script>

	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	<script src="__PUBLIC__/js/html5shiv.js"></script>
	<script src="__PUBLIC__/js/respond.min.js"></script>
	<![endif]-->
	<script type="text/javascript">
	var upload_url="<?php echo U('file/upload?module='.MODULE_NAME);?>";
	var del_url="<?php echo U('File/del');?>";
	var session_id="<?php echo session_id();?>";	
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?2a935166b0c9b73fef3c8bae58b95fe4";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
</script>
</head>
<body>
	<div class="shade"></div>
	<div class="row-fluid navbar visible-phone">
	<div class="row-fluid">
		<a class="brand" href="<?php echo U('home/index');?>">广溢网络</a>
		<a data-toggle="collapse" data-target="#top_menu" class="right">
		<i class="brand icon-th-list"></i>
		</a>
	</div>
	<div class="col-lapse" id="top_menu">
		<ul class="nav nav-pills">
			<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
					<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($tag["id"]); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
				</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>
	</div>
</div>
<div class="row-fluid navbar hidden-phone">
	<a class="brand" href="<?php echo U('home/index');?>">广溢网络</a>
	<ul class="nav nav-pills">
		<?php if(is_array($list_top_menu)): $i = 0; $__LIST__ = $list_top_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tag): $mod = ($i % 6 );++$i;?><li>
				<a  href="#" url="<?php echo U($tag['url']);?>" node="<?php echo ($tag["id"]); ?>" onclick="click_top_menu(this)"><?php echo ($tag["name"]); ?></a>
			</li><?php endforeach; endif; else: echo "" ;endif; ?>
	</ul>
	<aside>
		<span>
			<a href="<?php echo U('UserConfig/index');?>">设置</a>
		</span>
		<span>
			<a href="<?php echo U('profile/index');?>"><?php echo (session('user_name')); ?></a>
		</span>
		<span>
			<a href="<?php echo U('login/logout');?>">退出</a>
		</span>
		&nbsp;&nbsp;
	</aside>
</div>

	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span3 left_menu">
				<div class="visible-phone">
	<h4 class="btn no-border" data-toggle="collapse" data-target="#left_menu">		
			<?php echo ($top_menu_name); ?><i class="icon-angle-down"></i>
		</h4>
	<div class="col-lapse" id="left_menu"><?php echo ($html_left_menu); ?></div>
</div>
<div class="hidden-phone">
	<h4><?php echo ($top_menu_name); ?></h4>
	<div><?php echo ($html_left_menu); ?></div>
</div>
			</div>
			<div class="span9 content">

<script type="text/javascript" src="__PUBLIC__/editor/kindeditor.js"></script>
<script type="text/javascript" src="__PUBLIC__/editor/kindeditor.setting.js"></script>
<script type="text/javascript">
	function save() {
		$("#confirm").val("");
		$("#confirm_wrap  span").each(function() {
			$("#confirm").val($("#confirm").val() + $(this).attr("emp_no") + '|');
		})
		$("#confirm_name").val("");
		$("#confirm_name").val($("#confirm_wrap").html());

		$("#consult").val("");
		$("#consult_wrap  span").each(function() {
			$("#consult").val($("#consult").val() + $(this).attr("emp_no") + '|');
		})

		$("#consult_name").val("");
		$("#consult_name").val($("#consult_wrap").html());

		$("#refer").val("");
		$("#refer_wrap  span").each(function() {
			$("#refer").val($("#refer").val() + $(this).attr("emp_no") + '|');
		})

		$("#refer_name").val("");
		$("#refer_name").val($("#refer_wrap").html());

		editor.sync();
		if(check_form("form_data")){
			sendForm("form_data", "<?php echo U('save');?>","<?php echo U('edit?id='.$vo['id']);?>");
		}
	}
	function popup_flow(){
		winopen("<?php echo U('popup/flow');?>",800,574);
	}

	$(document).ready(function() {		
		editor_init();
		set_val("is_del", "<?php echo ($vo["is_del"]); ?>");
		set_val("group", "<?php echo ($vo["group"]); ?>");
		set_val("type", "<?php echo ($vo["type"]); ?>");
	})
</script>
<div class="contact">
	<div class="row-fluid title"><span>编辑流程:<?php echo ($vo["name"]); ?></span></div>
	<form method='post' id="form_data">
		<input type="hidden" id="id" name="id" value="<?php echo ($vo["id"]); ?>">
		<input type="hidden" id="opmode" name="opmode" value="edit">
		<input type="hidden" id="ajax" name="ajax" value="1">
		<input type="hidden" id="confirm" name="confirm" >
		<input type="hidden" id="confirm_name" name="confirm_name" >
		<input type="hidden" id="consult" name="consult" >
		<input type="hidden" id="consult_name" name="consult_name">
		<input type="hidden" id="refer" name="refer">
		<input type="hidden" id="refer_name" name="refer_name" >
		<div class="row-fluid form_box">
				<div class="row-fluid form-horizontal">
						<div class="control-group span6">
								<label class="control-label" for="name">名称*：</label>
								<div class="controls">
										<input type="text" id="name" name="name"  value="<?php echo ($vo["name"]); ?>"  check="require" msg="请输入名称"></div>
						</div>
						<div class="control-group span6">
								<label class="control-label" for="short">简称*：</label>
								<div class="controls">
										<input type="text" id="short" name="short" value="<?php echo ($vo["short"]); ?>" check="require" msg="请输入简称"></div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group span6">
								<label class="control-label" for="doc_no_format">编码格式*：</label>
								<div class="controls">
										<input type="text" id="doc_no_format" name="doc_no_format"  value="<?php echo ($vo["doc_no_format"]); ?>"  check="require" msg="请输入文档编码格式"></div>
						</div>
						<div class="control-group span6">
								<label class="control-label" for="group">分组：</label>
								<div class="controls">
										<select type="select-one" id="group" name="group" onchange="" ondblclick="" class="writeable" ><option value="" >选择或录入</option><?php  foreach($group_list as $key=>$val) { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } ?></select>
							<script type="text/javascript">
								<!--$("#group option[value='<?php echo ($vo["group"]); ?>'").attr("selected", "selected");
								//-->
							</script>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group span6">
								<label class="control-label" for="sort">排序：</label>
								<div class="controls">
										<input type="text" id="sort" name="sort" value="<?php echo ($vo["sort"]); ?>"></div>
						</div>
						<div class="control-group span6">
								<label class="control-label" for="is_del">状态：</label>
								<div class="controls">
									<select name="is_del" id="is_del">
										<option value="0" >启用</option>
										<option value="1">禁用</option>
									</select>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group span12">
							<textarea id="content" name="content" style="width:100%;height:300px;"><?php echo ($vo["content"]); ?></textarea>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group span6">
								<label class="control-label" for="type">流程类型：</label>
								<div class="controls">
										<select name="type" id="type" type="select-one">
											<option value="0" >自由</option>
											<option value="1">固定</option>
										</select>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group span6">
								<label class="control-label">裁决步骤：</label>
								<div class="controls">
									<div class="address_list" id="confirm_wrap" style="display: block;"><?php echo ($vo["confirm_name"]); ?></div>
									<a  onclick="popup_flow();" class="btn">选择裁决条件</a>
								</div>
						</div>
				</div>
				<div class="row-fluid form-horizontal">
						<div class="control-group span6">
								<label class="control-label">协商步骤：</label>
								<div class="controls">
									<div class="address_list" id="confirm_wrap" style="display: block;"><?php echo ($vo["consult_name"]); ?></div>
									<a  onclick="popup_flow();" class="btn">选择协商步骤</a>
								</div>
						</div>
				</div>						
				<div class="row-fluid form-horizontal">
						<div class="control-group span6">
								<label class="control-label">抄送：</label>
								<div class="controls">
									<div class="address_list" id="confirm_wrap" style="display: block;"><?php echo ($vo["refer_name"]); ?></div>
									<a  onclick="popup_flow();" class="btn">选择抄送人员</a>
								</div>
						</div>
				</div>			
			<div class="action">
					<input class="btn default" type="button" value="保存" onclick="save();">
					<input  class="btn" type="button" value="取消" onclick="go_return_url();">
			</div>
	</form>
</div></div>
		</div>
	</div>
	<div class="msg popout"></div>
	<iframe src="<?php echo U('push/client');?>" class="push" id="push"></iframe>
	<script src="__PUBLIC__/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/js/jquery-ui-1.9.2.custom.min.js"></script>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>